package com.shine.app.bean.responses;

import java.util.ArrayList;
import java.util.List;

import com.google.gson.annotations.SerializedName;
import com.shine.app.bean.BaseBean;
import com.shine.app.bean.MyFavoriteBean;

public class GetMyFavoriteResponse extends BaseBean {

	private static final long serialVersionUID = 1L;
	@SerializedName("HasError")
	private boolean hasError;
	@SerializedName("ErrorMessage")
	private String errorMessage;
	@SerializedName("ErrorType")
	private String errorType;
	@SerializedName("Data")
	private MyFavoriteBean[] data;

	public boolean isHasError() {
		return hasError;
	}

	public void setHasError(boolean hasError) {
		this.hasError = hasError;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

	public String getErrorType() {
		return errorType;
	}

	public void setErrorType(String errorType) {
		this.errorType = errorType;
	}

	public MyFavoriteBean[] getData() {
		return data;
	}

	public void setData(MyFavoriteBean[] data) {
		this.data = data;
	}

	public static List<MyFavoriteBean> parse(GetMyFavoriteResponse response) {
		List<MyFavoriteBean> list = new ArrayList<MyFavoriteBean>();
		if (response != null) {
			MyFavoriteBean[] array = response.getData();
			for (int i = 0, length = array.length; i < length; i++) {
				list.add(array[i]);
			}
		}
		return list;
	}
}
